package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.DeviceCheckHistory;
import com.zhijian.medical.entity.vo.request.DeviceCheckHistorySearchVo;
import com.zhijian.medical.entity.vo.response.DeviceCheckHistoryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceCheckHistoryMapper {
    int deleteByPrimaryKey(Long id);

    int insert(DeviceCheckHistory record);

    int insertSelective(DeviceCheckHistory record);

    DeviceCheckHistory selectByPrimaryKey(Long id);

    /**
     * 根据设备查询
     *
     * @param deviceId
     * @return
     */
    DeviceCheckHistory selectByDeviceId(Long deviceId);

    int updateByPrimaryKeySelective(DeviceCheckHistory record);

    int updateByPrimaryKey(DeviceCheckHistory record);

    int count(DeviceCheckHistorySearchVo deviceCheckHistorySearchVo);

    List<DeviceCheckHistoryVo> selectList(DeviceCheckHistorySearchVo deviceCheckHistorySearchVo);

    DeviceCheckHistoryVo selectVoById(Long id);

    int insertBatch(@Param("entities") List<DeviceCheckHistory> entities);

    /**
     * 查询出某天最新数据的code
     *
     * @return
     */
    String selectMaxCodeByDay(String day);
}